package com.kanasco.engg.controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import bb.access.po.Part;
import bb.common.PartPK;

import com.kanasco.engg.services.IItemService;

public class ItemPickListController implements Controller {
	IItemService itemService;
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response)throws ServletException, IOException{
		HttpSession session=request.getSession();
		int startIndex=1;
		int maxIndex=5;
		session.setAttribute("startIndex", startIndex);
		session.setAttribute("maxIndex",maxIndex);
		
		PartPK pk=new PartPK();
		
         List list=new ArrayList();
       List<Part> itemList=itemService.getAllItemList();
     
		session.setAttribute("itemList",itemList);
		return new ModelAndView("PickItemList","ItemList",itemList);
}
	public void setItemService(IItemService itemService) {
		this.itemService = itemService;
	}
	
}